package cn.tedu.spring.dibase;

/**
 * xml文件名: bean-di.xml
 * 测试类名: TestBook
 * 要求:使用xml方式创建Bean对象,并在打印测试
 */
public class Book {
    private String bookName;
    private String bookAuthor;

    //set方法：xml文件进行依赖注入[<property></property>]时使用set方法进行注入
    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public void setBookAuthor(String bookAuthor) {
        this.bookAuthor = bookAuthor;
    }

    @Override
    public String toString() {
        return "Book{" +
                "bookName='" + bookName + '\'' +
                ", bookAuthor='" + bookAuthor + '\'' +
                '}';
    }
}




